package com.duobaoyu.dby.supply.biz.statemachine;

import com.alibaba.cola.statemachine.Action;
import org.springframework.stereotype.Component;

/**
 * @author liyang
 * @version 1.0.0
 * @ClassName UserCloseAction
 * @createTime 14:13:00 2023/10/23
 */
@Component
public class UserCloseAction implements Action<StatusEnum, OrderEvent, Order> {

    @Override
    public void execute(StatusEnum from, StatusEnum to, OrderEvent event, Order context) {
        System.out.println("用户关闭流程开始走了");
        System.out.println("从这个状态-【" + from.getInfo() + "】-转为+【" + to.getInfo() + "】 的状态");
        System.out.println("上下文信息：" + context.toString());
        System.out.println("中间执行的一些操作.......");
        System.out.println("用户关闭流程完毕了");
    }
}
